package com.yiip.gmall.gmall.user.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.yiip.gmall.beans.UmsMember;
import com.yiip.gmall.beans.UmsMemberReceiveAddress;
import com.yiip.gmall.gmall.user.mapper.UserMapper;
import com.yiip.gmall.gmall.user.mapper.UserReceiveAddressMapper;
import com.yiip.gmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Autowired
    UserReceiveAddressMapper userReceiveAddressMapper;

    @Override
    public List<UmsMember> getAllUser() {
        List<UmsMember> userList = userMapper.selectList(null);
        return userList;
    }

    @Override
    public List<UmsMemberReceiveAddress> getAllUserReceiveAddress() {
        List<UmsMemberReceiveAddress> umsMemberReceiveAddresses = userReceiveAddressMapper.selectList(null);
        return umsMemberReceiveAddresses;
    }
}
